import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
// 引入cookie
import Cookie from 'react-cookies';
// 引入路由
import * as Router from 'react-router-dom';
// 引入react-vant 组件
import * as Vant from 'react-vant';
// 引入接口文件
import api from './api/index';

// 定义全局属性，挂载cookie
React.$cookie = Cookie;
// 定义全局属性，挂载路由
React.$router = Router
// 定义全局属性，挂载vant组件
React.$vant = Vant
// 定义全局属性，挂载接口
React.$api = api

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  // <React.StrictMode>
    <App />
  // </React.StrictMode>
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
